package tkM

import (
	"fmt"
	"db2s/global"
	"db2s/go-log/log"
	mq "db2s/topic-mq"
)

var (
	baseMsgSendBody            mq.MonitorMsgMq
	ObjectSplitResult          = make(chan any, global.ChannelDefault)
	tableObjectRoleUniqHashMap = make(map[string]int)
	ObjectFlow                 = make(chan any, global.ChannelDefault)
	meta                       *CheckSchemaMetaData
	continueTableList          = make(map[string]int)
)

var (
	recoverCost = func(s string,r any) error{
		return fmt.Errorf(fmt.Sprintf("%v defer recover An exception was captured. abnormal is %v ", s, r))
	}
	recoverException = func(event string) {
		if re := recover(); re != nil {
			log.ErrorLog().Error(fmt.Sprintf("%v", recoverCost(event,re)))
		}
		return
	}
)